﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZXing;
using System.Drawing;
using System.Net;

namespace ShareMarking.Interface
{
    public class CheckQrcode
    {
        public string getqrcontent(string imgurl)
        {
            try
            {
                var reader = new BarcodeReader();
                Image O_Image = Image.FromStream(WebRequest.Create(imgurl).GetResponse().GetResponseStream());
                Result result = reader.Decode((Bitmap)O_Image); //通过reader解码
                if (result != null)
                {
                    return result.Text; //显示解析结果
                }
                return "";
            }
            catch (Exception ex)
            {
                ComLib.LogLib.Log4NetBase.Log("导出检查错误:"+ex.Message);
                return "";
            }
        }
    }
}
